﻿using System;
using System.Collections.Generic;
using System.Text;
using SharpMap.Utilities;
using System.Windows.Forms;




namespace CCSSysSetting
{
    public class DepartmentSettingCmd:SharpMap.Utilities.BaseCommand
    {

      	private System.Windows.Forms.Form m_pMainForm;

		//private ESRI.ArcGIS.Geodatabase.ISpatialFilter m_pSpFilter;
		public DepartmentSettingCmd()
		{
			base.m_caption = "部门设置";
			//base.m_category = "RPISQuery";
			//base.m_message = "楼盘信息查询";
            base.m_name = "部门设置";
			base.m_toolTip = "部门设置";
		}
	
		public override void OnCreate(object hook)
		{

            m_pMainForm = (Form)hook;
            //SplitContainer pSplitContainer;
            ////得到MapControl
            //for (int i = 0; i <= m_pMainForm.Controls.Count - 1; i++)
            //{
            //    if (m_pMainForm.Controls[i].Name == "splitContainer1")
            //    {
            //        pSplitContainer = (SplitContainer)m_pMainForm.Controls[i];
            //        for (int l = 0; l <= pSplitContainer.Panel2.Controls.Count - 1; l++)
            //        {
            //            if (pSplitContainer.Panel2.Controls[l].Name == "mcMainMap")
            //            {
            //               // m_pMapImage = (SharpMap.Forms.MapImage)pSplitContainer.Panel2.Controls[l];
            //                break;
            //            }
            //        }

            //        break;
            //    }

            //}
      }


		public override void OnClick()
		{
				
            base.OnClick ();
            DepartmentSettingForm m_frmDepartmentSettingForm = new DepartmentSettingForm();
            m_frmDepartmentSettingForm.m_user = m_user;
            m_frmDepartmentSettingForm.MdiParent = m_pMainForm;
            m_frmDepartmentSettingForm.Show();
            m_frmDepartmentSettingForm.WindowState = FormWindowState.Maximized;    
		}




    }
}
